/*
 * @Author: lixiaowei
 * @Date: 2021-04-06 18:57:55
 * @LastEditors: lixiaowei
 * @LastEditTime: 2021-04-06 19:00:33
 * @Description: 联合体定义与使用
 * @FilePath: /heima-bli/结构体/联合体union.cpp
 */

#include <iostream>
using namespace std;

int main()
{
  union u1 {
    double d;
    char a;
    char c;
  };

  cout << sizeof(u1) << endl; // 8

  return 0;
}